package com.boatAnchorAssistant.service.controller.web;

import com.boatAnchorAssistant.pojo.param.userOperationLog.*;
import com.boatAnchorAssistant.pojo.vo.userOperationLog.*;
import com.boatAnchorAssistant.service.service.in.*;
import nirvana.core.domains.vo.PageResult;
import nirvana.core.domains.vo.ApiResult;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

import java.util.List;

/**
 *   web/用户操作日志
 * 【描 述】：
 * 【环 境】：J2SE
 * 【详 细】：
 *
 */
@RestController
@RequestMapping("/userOperationLog/web")
public class UserOperationLogWebController {

    private final UserOperationLogService service;

    public UserOperationLogWebController(UserOperationLogService service) {
        this.service = service;
    }


    /**
     * 获取用户操作日志列表
     * @param param
     * @return
     */
    @PostMapping("/getUserOperationLogList")
    public ApiResult<PageResult<GetUserOperationLogListVo>> getUserOperationLogList(@RequestBody GetUserOperationLogListParam param) {
        PageResult<GetUserOperationLogListVo> result = service.getUserOperationLogList(param);
        return ApiResult.ok(result);
    }


    /**
     * 获取操作类型下拉列表
     * @return
     */
    @GetMapping("/getOperationTypeList")
    public ApiResult<List<GetOperationTypeListVo>> getOperationTypeList(){
        List<GetOperationTypeListVo> list = service.getOperationTypeList();
        return ApiResult.ok(list);
    }


}

